#include <parser.h>

#include <iostream>
using std::cout;
using std::endl;

#include <string.h>

int main(int argc, char *argv[])
{
	char *text = "Hello, this is a typical example of lexical analisys"
	" just done to test the Parser class developed for P4F\n";
	int len = strlen(text);
	
	Parser p(text, len);
	//Get word after message
	p.find_word("typical");
	cout << p.get_next() << endl;
	
	//Get string between separators(not space)
	p.goto_pos(0);
	p.find_word("Hello");
	p.set_separator(",");
	cout << p.get_next() << endl;
	return 1;
}
